import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:online_study/mine/answer/answer_daily.dart';
import 'package:online_study/mine/exam/exam_list.dart';
import 'package:online_study/mine/required/required_course.dart';
import 'package:online_study/theme/colors.dart';
import 'package:online_study/theme/size.dart';

//我的模块(每日答题,员工考试,必修课程,问卷调查)
class MyModulePage extends StatefulWidget {
  @override
  _MyModulePageState createState() => _MyModulePageState();
}

class _MyModulePageState extends State<MyModulePage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(
          left: ThemeSize.width9,
          right: ThemeSize.width9,
          bottom: ThemeSize.height6),
      padding: EdgeInsets.symmetric(vertical: ThemeSize.height12),
      decoration: BoxDecoration(
          color: ThemeColor.colorWhite,
          borderRadius: BorderRadius.circular(ThemeSize.height8)),
      child: Row(
        children: [
          Flexible(
              child: GestureDetector(
            child: Column(
              children: [
                Container(
                  alignment: Alignment.center,
                  height: ThemeSize.height30,
                  width: ThemeSize.height30,
                  child: Image.asset('assets/images/datika.png',
                      fit: BoxFit.cover),
                ),
                Container(
                  alignment: Alignment.center,
                  margin: EdgeInsets.only(top: ThemeSize.height10),
                    child: Text("每日答题",
                        style: TextStyle(
                            color: ThemeColor.color333333,
                            fontSize: ThemeSize.sp13)),
                  )
                ],
              ),
              onTap: () {
                Get.to(() => AnswerDailyPage());
              },
            ),
          ),
          Flexible(
            child: GestureDetector(
              child: Column(
                children: [
                  Container(
                    alignment: Alignment.center,
                    height: ThemeSize.height30,
                    width: ThemeSize.height30,
                    child: Image.asset('assets/images/kaoshi.png',
                        fit: BoxFit.cover),
                  ),
                Container(
                  alignment: Alignment.center,
                  margin: EdgeInsets.only(top: ThemeSize.height10),
                    child: Text("员工考试",
                        style: TextStyle(
                            color: ThemeColor.color333333,
                            fontSize: ThemeSize.sp13)),
                  )
                ],
              ),
              onTap: () {
                Get.to(() => ExamListPage());
              },
            ),
          ),
          Flexible(
            child: GestureDetector(
              child: Column(
                children: [
                  Container(
                    alignment: Alignment.center,
                    height: ThemeSize.height30,
                    width: ThemeSize.height30,
                    child: Image.asset('assets/images/kecheng.png',
                        fit: BoxFit.cover),
                  ),
                  Container(
                    alignment: Alignment.center,
                    margin: EdgeInsets.only(top: ThemeSize.height10),
                    child: Text("必修课程",
                        style: TextStyle(
                            color: ThemeColor.color333333,
                            fontSize: ThemeSize.sp13)),
                  )
                ],
              ),
              onTap: () {
                Get.to(() => RequiredCoursePage());
              },
            ),
          ),
          Flexible(
            child: Column(
              children: [
                Container(
                  alignment: Alignment.center,
                  height: ThemeSize.height30,
                  width: ThemeSize.height30,
                  child: Image.asset('assets/images/wenjuandiaocha.png',
                      fit: BoxFit.cover),
                ),
                Container(
                  alignment: Alignment.center,
                  margin: EdgeInsets.only(top: ThemeSize.height10),
                  child: Text("问卷调查",
                      style: TextStyle(
                          color: ThemeColor.color333333,
                          fontSize: ThemeSize.sp13)),
                )
              ],
            ),
          ),
        ],
      ),
    );
  }
}
